import Vue from 'vue'
import Router from 'vue-router'
import Home from './pages/home'

Vue.use(Router)

const page = name => () => import('./pages/' + name)

export default new Router({
  mode: 'history',
  routes: [
    { path: '/', component: Home },
    { path: '/switch', component: page('switch') },
    { path: '/checkbox', component: page('checkbox') },
    { path: '/button', component: page('button') },
    { path: '/input', component: page('input') }
  ]
})
